-- GENERATED SPELL FOR [Outcast Necromancer] --


function spell0_11559(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11559', 3000, 1)
end

function spell1_11559(pUnit, Event) --@Summon Magram Ravager,Self--
pUnit:FullCastSpellOnTarget(18166,pUnit)
pUnit:RegisterEvent('Sorts_11559', 4000, 1)
end

function Sorts_11559(pUnit, Event)
local choix_sorts_11559 = math.random(0, 1)
if choix_sorts_11559 == 0 then
pUnit:RegisterEvent('spell0_11559', 1, 1)
end
if choix_sorts_11559 == 1 then
pUnit:RegisterEvent('spell1_11559', 1, 1)
end
end

function mob11559_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11559', math.random(1500, 3000), 1)
end

function mob11559_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11559_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11559_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11559, 1, 'mob11559_Action')
RegisterUnitEvent(11559, 2, 'mob11559_Leave')
RegisterUnitEvent(11559, 3, 'mob11559_Kill')
RegisterUnitEvent(11559, 4, 'mob11559_Die')
